/**
 * Project Name:alqsoft-ms
 * File Name:InitParamServerProperties.java
 * Package Name:com.alqsoft.init
 * Date:2016年10月20日上午11:17:30
 * Copyright (c) 2016, chenzhou1025@126.com All Rights Reserved.
 *
*/

package com.alqsoft.init;

import com.alqsoft.ServerProperties;

/**
 * ClassName:InitParamServerProperties <br/>
 * Function: TODO ADD FUNCTION. <br/>
 * Reason:	 TODO ADD REASON. <br/>
 * Date:     2016年10月20日 上午11:17:30 <br/>
 * @author   张灿
 * @version  
 * @since    JDK 1.8
 * @see 	 
 */
public class InitParamServerProperties extends ServerProperties{
	
	public  InitParamServerProperties(){
		InitParamUtils.init();
		setValues();
	}
	
	private void setValues(){
		this.setMaxIdle(Integer.parseInt(InitParamUtils.getString(InitParams.getREDISMAXIDLE())));
		this.setRedisIp(InitParamUtils.getString(InitParams.getREDISIP()));
		this.setRedisPort(Integer.parseInt(InitParamUtils.getString(InitParams.getREDISPORT())));
		this.setServerIp(InitParamUtils.getString(InitParams.getSRVERIP()));
		this.setServerPort(Integer.parseInt(InitParamUtils.getString(InitParams.getSRVERPORT())));
		this.setTestOnBorrow(Boolean.getBoolean(InitParamUtils.getString(InitParams.getTESTONBORROW())));
		this.setServerInterceptors(InitParamUtils.getString(InitParams.getSERVERINTERCEPTORS()));
	}
}
